
=HTTP Transport Overview=

The '''urn:org:netkernel:tpt:http''' module contains a full-featured HTTP transport infrastructure
comprising a set of composable parts that may be combined to create flexible HTTP request processing.  

* [[doc:tpt:http:HTTPTransport|HTTP Transport]] - a high-performance HTTP transport.
* [[doc:tpt:http:HTTPBridge|HTTP Bridge]] - an overlay that presents the low-level HTTPRequest and HTTPResponse objects as an ROC addressable resource space.
* [[doc:tpt:http:HTTPSession|HTTP Session]]  - an overlay that detects HTTP Cookies and maps them to a server-side session address space which is injected into the request scope.

These parts can be configured to provide an HTTP application or web service implementation a
uniform ROC addressable resource representing the HTTP request event detected by the transport.

==Typical Deployment Pattern==

The diagram below shows a typical deployment pattern.

{svg}res:/org/netkernel/http/doc/HTTPOverview.svg{/svg}

A root request from the physical-level HTTP transport is injected into the Fulcrum Space.  The HTTPBridge is configured to receive the
root request.   The Bridge then takes the underlying HTTPRequest and Response Objects and hides them inside a dynamically inserted
[[doc:tpt:http:httpRequest|httpRequest:]] / [[doc:tpt:http:httpResponse|httpResponse:]] address space.  

Tthe Web Application in the "Application Space" sees only a uniform logical address space httpRequest: and httpResponse: and does not need
to be concerned by the low level physical transport.

==Preconfigured Fulcrums==

The front and back-end fulcrums provided with NetKernel Standard Edition are preconfigured in the above
deployment pattern so typically application and service developers should not need to worry about
the low level physical infrastructure.

==Sessions==

HTTP is a stateless protocol but often it can be convenient to store server-side state between requests from a given web-client.  Low-level session cookies are usually exchanged in order to correlate a server-side stateful session
with an individual web client.  Therefore each request from the web-client is reconnected to the stateful resources held in their "session".

The NetKernel HTTPSession infrastructure does for web-sessions what the HTTPBridge does for the low-level HTTP protocol - it abstracts a
session into a uniform logical resource address space and automatically correlates the client with its session space.

{svg}res:/org/netkernel/http/doc/SessionOverview.svg{/svg}   

Sessions are not configured by default but may be inserted into a web application's address space using the [[doc:tpt:http:HTTPSession|HTTPSession]] overlay.  Once the HTTPSession overlay
is in place the application may seamlessly SINK and SOURCE to the session:/ address space and know that each future request from
the currently interacting web-client will be correlated to the same session:/ space the next time they request the application or service.

An application developer that places their application in a HTTPBridge and HTTPSession is presented with a completely uniform set of logical
ROC address spaces:  httpRequest:. httpResponse: and session:


